<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/basic.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<script src="js/ie7/IE7.js" type="text/javascript"></script>
<![endif]-->

</head>

<body>
<h1>Proyectos.</h1>

<?php
  if( count($_SESSION['messages'])> 0){
  	print_r($_SESSION['messages']);
	$_SESSION['messages']=array();
  }
  ?>

<p><a href="index.php">Proyectos</a>  |  <a href="?v=manageusers">Administrar usuarios</a></p>
<p><a href="index.php?v=newuser">Crear nuevo usuario</a></p>

<?php 
$users=getUsers();
if($users && mysql_num_rows($users) > 0){
?>
<ul class="listado proyects">
<?php
	while($user = mysql_fetch_object($users) ){
?>
  <li><h3><?php echo utf8_encode($user->name); ?></h3>
  <p><a href="index.php?v=edituser&id=<?php echo $user->id; ?>">Editar</a> </p> 
  <p><?php echo $user->type; ?></p></li>
<?php 
	}
?>
</ul>
<?php 
}
?>
</body>
</html>
